package com.yequan.designpattern.strategy.one;

/**
 * @author yq
 * @date 2020/09/27
 */
public class Test {

    public static void main(String[] args) {
        new Thread(() -> {
            ExeVo bpaExeVo = new ExeVo();
            bpaExeVo.setId(1);
            bpaExeVo.setCalcType("bpa");
            bpaExeVo.setExeName("db2bpa");
            bpaExeVo.setKey("bpa-a");
            bpaExeVo.setMsg("bpa计算：计算程序db2bpa.exe");

            AParam aParam = new AParam();
            aParam.setLineName("lineA");
            aParam.setLineId(1);
            aParam.setDbId(100);
            bpaExeVo.setParam(aParam);
            ExeExecutor.getInstance().execute(bpaExeVo);
        }).start();

        new Thread(() -> {
            ExeVo flowExeVo = new ExeVo();
            flowExeVo.setId(2);
            flowExeVo.setCalcType("flow");
            flowExeVo.setExeName("flow");
            flowExeVo.setKey("flow-b");
            flowExeVo.setMsg("潮流计算：计算程序flow.exe");

            BParam bParam = new BParam();
            bParam.setBusId(20890);
            bParam.setqId(786);
            flowExeVo.setParam(bParam);

            ExeExecutor.getInstance().execute(flowExeVo);
        }).start();
    }

}
